package chapter_17_command.classic2;

/**
 * @author yaochenglong
 * @date 2017/10/20
 */
public class ConcreteCommand1 extends AbstractCommand {

    //默认使用ConcreteReceiver1接收者
    public ConcreteCommand1(){
        super(new ConcreteReceiver1());
    }

    //可以选择接收者
    public ConcreteCommand1(Receiver receiver) {
        super(receiver);
    }

    @Override
    public void execute() {
        receiver.doSomething();
    }
}
